<?php
require "model/index.model.php";
session_start();
if(isset($_SESSION['username'])){
$id = $_GET["id"];
$tr = userList::deleuser($id);
if($tr){
   
    echo "<script>alert('删除成功');parent.location.href='index.php';</script>";
}else{
    
    echo "<script>alert('删除失败');parent.location.href='index.php';</script>";
}
}else{
    header("Location:./login.php");
    exit();
}